//  -------------------- iSharePoint -------------------- //
// 
//  Company:	IT Complex, LLC
//  Project:	Smart.Common
//  File name:	MetaFormCreateDocumentButton.cs
//  Developer:	Solomatov Igor
//  Created:	15.04.2012
// 
//  -------------------- iSharePoint -------------------- //

namespace Smart.Common.Forms
{
	/// <summary>
	/// Private Office forms button
	/// </summary>
	public class MetaFormCreateDocumentButton : MetaFormButton
	{
		public string ListId { get; set; }
		public string Source { get; set; }
		public string ContentType { get; set; }
		public string RootFolder { get; set; }

		//public override string Command
		//{
		//    get { return string.Format("POCreateDocument('{0}', '{1}', '{2}', '{3}')", Source, ListId, RootFolder, ContentType); }
		//}

		public MetaFormCreateDocumentButton(string title, string name, string command)
			: base(title, name, command)
		{
		}

		public virtual void BuildCommand()
		{
			Command = string.Format("POCreateDocument('{0}', '{1}', '{2}', '{3}')", Source, ListId, RootFolder, ContentType);
		}
	}
}